{extend name='admin@main'}

{block name="button"}

{if auth("add")}
<!-- <button data-modal='{:url("add")}' data-title="添加订单" class='layui-btn layui-btn-sm layui-btn-primary'>添加订单</button> -->
{/if}
{if auth("remove")}
<!-- <button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些订单吗？" class='layui-btn layui-btn-sm layui-btn-primary'>删除订单</button> -->
{/if}
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='order/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='text-left nowrap'>姓名</th>
            <!-- <th class='text-center nowrap'>组长</th> -->
            <th class='text-center nowrap'>类型</th>
            <th class='text-center nowrap'>分类</th>
            <th class='text-center nowrap'>属性</th>
            <th class='text-left nowrap'>主体名称</th>
            <th class='text-center nowrap'>结算方式</th>
            <!-- <th class='text-center nowrap'>商品买赔</th>
            <th class='text-center nowrap'>超时罚款</th>
            <th class='text-center nowrap'>其他罚款项</th> -->
            <th class='text-left nowrap'>完成件数</th>
            <th class='text-left nowrap'>总金额</th>
            <th class='text-left nowrap'>扣罚金额</th>
            <th class='text-left nowrap'>应发金额</th>
            <th class='text-left nowrap'>已支付金额</th>
            <th class='text-left nowrap'>待支付金额</th>
            <th class='text-left nowrap'>手机</th>
            <th class='text-left nowrap'>银行卡号</th>
            <th class='text-left nowrap'>身份证</th>
            <th class='text-left nowrap'>车牌号</th>
            <th class='text-left nowrap'>车型</th>
            <th class='text-left nowrap'>确认凭证</th>
            <th class='text-left nowrap'>入职时间</th>
            <th class='text-left nowrap'>离职时间</th>
            <th class='text-center nowrap'>是否抽检</th>
            <th class='text-left nowrap'>添加时间</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class='text-left nowrap'>{$vo.user_name|default='-'}</td>
            <!-- <td class='text-center nowrap'>
                {eq name='vo.is_group' value='0'}<span class="layui-badge layui-bg-red">否</span>{/eq}
                {eq name='vo.is_group' value='1'}<span class="layui-badge layui-bg-blue">是</span>{/eq}
            </td> -->
            <td class='text-center nowrap'>
                {eq name='vo.type' value='0'}<span class="layui-badge layui-bg-blue">运力</span>{/eq}
                {eq name='vo.type' value='1'}<span class="layui-badge layui-bg-green">分拣</span>{/eq}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.classify' value='0'}<span class="layui-badge layui-bg-blue">固定</span>{/eq}
                {eq name='vo.classify' value='1'}<span class="layui-badge layui-bg-green">临时</span>{/eq}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.att' value='0'}<span class="color-red">车队</span>{/eq}
                {eq name='vo.att' value='1'}<span class="color-green">个人</span>{/eq}
                {eq name='vo.att' value='2'}<span class="color-desc">劳务</span>{/eq}
                {eq name='vo.att' value='3'}<span class="color-blue">自招</span>{/eq}
            </td>
            <td class='text-left nowrap'><span class="color-blue">{$vo.body_name|default='-'}</span></td>
            <td class='text-center nowrap'>
                {eq name='vo.payment_way' value='0'}<span class="color-red">周结</span>{/eq}
                {eq name='vo.payment_way' value='1'}<span class="color-green">月结</span>{/eq}
                {eq name='vo.payment_way' value='2'}<span class="color-desc">无</span>{/eq}
            </td>
            <!-- <td class='text-left nowrap'>
                总金额：{$vo.goods_fine_price|default='-'}<br>
                凭证：<a data-tips-image="{$vo.goods_fine_evidence|default=''}" class="fa fa-image font-s14 margin-right-5"></a>
            </td>
            <td class='text-left nowrap'>
                点数：{$vo.timeout_fine_count|default='-'}<br>
                单价：{$vo.timeout_fine_price|default='-'}<br>
                凭证：<a data-tips-image="{$vo.timeout_fine_evidence|default=''}" class="fa fa-image font-s14 margin-right-5"></a>
            </td>
            <td class='text-left nowrap'>
                总金额：{$vo.other_fine_price|default='-'}<br>
                备注：{$vo.other_fine_remark|default='-'}<br>
                
            </td> -->
            <td class='text-left nowrap'>{$vo.sum|default='-'}</td>
            <td class='text-left nowrap'>{$vo.sum_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.fine_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.reality_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.complete_pay_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.wait_pay_price|default='-'}</td>
            <td class='text-left nowrap'>{$vo.phone|default='-'}</td>
            <td class='text-left nowrap'>{$vo.bank_number|default='-'}</td>
            <td class='text-left nowrap'>{$vo.ID_number|default='-'}</td>
            <td class='text-left nowrap'>{$vo.car_number|default='-'}</td>
            <td class='text-left nowrap'>{$vo.car_type|default='-'}</td>
            <td class='text-left nowrap'>
                <a data-tips-image="{$vo.confirm_evidence|default=''}" class="fa fa-image font-s14 margin-right-5"></a>
            </td>
            <td class='text-left nowrap'>
                {$vo.in_time|default='-'}
            </td>
            <td class='text-left nowrap'>
                {$vo.out_time|default='-'}
            </td>
            <td class='text-center nowrap'>
                {eq name='vo.is_check' value='0'}<span class="layui-badge layui-bg-red">未抽检</span>{/eq}
                {eq name='vo.is_check' value='1'}<span class="layui-badge layui-bg-orange">已抽检</span>{/eq}
            </td>
            <td class='text-left nowrap'>
                {$vo.create_at|format_datetime}
            </td>
            <td class='text-left nowrap'>

                {if auth("order_detail_index")}
                <a data-dbclick class="layui-btn layui-btn-sm layui-btn-normal" data-open='{:url("order_detail/index")}?order_id={$vo.id}&user_name={$vo.user_name}&back=1'>订单明细</a>
                {/if}

                {if auth("edit")}
                <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑订单信息" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {/if}

                {if auth("is_check") and $vo.is_check neq 0}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('is_check')}" data-value="id#{$vo.id};is_check#0" data-csrf="{:systoken('is_check')}">还 原</a>
                {elseif auth("is_check") and $vo.is_check neq 1 }
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('is_check')}" data-value="id#{$vo.id};is_check#1" data-csrf="{:systoken('is_check')}">抽 检</a>
                {/if}

                {if auth("remove")}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该订单吗？" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
                {/if}

            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
